<?php
class FormStepController extends Controller {
	public function actionIndex() {
		$this->render ( 'index', array () );
	}
	public function actionCreate() {
		$step = Yii::app ()->request->getParam ( 'step' );
		$callName = 'validateStep' . $step;
		if (method_exits ( $this, $callName )) {
			call_user_fun_array ( array (
					$this,
					$callName 
			), array () );
		}
		$array = array (
				'data' => array (
						'bb' 
				),
				'status' => 1 
		);
		echo json_encode ( $array );
	}
	protected function renderForm() {
		$actionId = $this->getAction ()->getId ();
		if ($actionId == 'create') {
			$this->_execInsertData ();
		} elseif ($actionId == 'update') {
			$this->_execUpdateData ();
		}
	}
	protected function createNewRecord() {
	}
	protected function execUpdateRecord() {
	}
}
?>